///@file Histogram.h
///@brief Declaration of an histogram
///@author Arnaud Duval
///@version 0.0
///@date 2010/05/11


#ifndef HISTOGRAM_H
#define HISTOGRAM_H

#include <iostream>
#include "Distribution.h"

///@class Histogram
///@brief Class defining an histogram
class Histogram
{
	private:
		///@brief Array containing the lower bound of each interval
		double *lowerbound;
		///@brief Array containing the count of realization for each interval
		unsigned int* count;
		///@brief Number of intervals
		unsigned int size;
	public:
		///@brief Default constructor
		Histogram();
		///@brief Constructor with given size
		Histogram(unsigned int);
		///@brief Contructor from an array of realization
		Histogram(double*, unsigned int, unsigned int);
		///@brief Constructor from a distribution
		Histogram(Distribution, unsigned int);
		///@brief Copy constructor
		Histogram(const Histogram&);
		///@brief Copy constructor from temporary objects
		Histogram(Histogram*);
		///@brief Destructor
		~Histogram();
		///@brief Overload of = operator
		Histogram& operator=(const Histogram&);
		///@brief Overload of = operator for temporary objects
		Histogram& operator=(Histogram*);

		///@brief Overload of << operator
		friend std::ostream& operator << (std::ostream&, const Histogram&);
};






#endif

